<?php
include dirname(__FILE__)."/s_user-verify.php";
include dirname(__FILE__)."/function.php";
if(isset($_POST['submited'])&&$_POST['submited']==1) {
	$prePassword=addslashes($_POST['pre_password']);
	$prePassword=md5($prePassword);
	$passsword=dowith_sql(addslashes($_POST['password']));
	$passsword=md5($passsword);
	$id=dowith_sql(addslashes($_SESSION['s_user_id']));
	$username=addslashes($_SESSION['s_username']);
	$ret=getSUser($username, $prePassword);
	if ($ret) {
		if(mysql_num_rows($ret)>0) {
			$params=array(
					'password'=>'"'.$passsword.'"',
			
			);
			if (updateSUser($params, $id)) {
				alertInfo("修改成功", getHost()."/front-show/home.php");
			
			}else {
				alertInfo("修改失败", getHost()."/front-show/home.php");
			
			}
		} else {
			alertInfo("账号密码错误",getHost().'/front-show/home.php');
				
		}
	}

}

?>